home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: Jan. 6, 1997
- // Author: ap
- //
- // Description: initializes ikHandleContext tool property sheet
- // values
- //
- // Input Arguments:
- // toolName - this is the name of the instance of the tool
- // that the property sheet is modifying.
- //
- // Return Value:
- // None.
- //
-
-
- global proc ikHandleHOptionValues( string $toolName, string $ctxCmd )
- {
- string $current;
- int $set;
- int $autoPriorityFlag;
-
- // current solver (option menu)
- string $solvertype = eval($ctxCmd + " -q -solverTypeH " + $toolName);
- string $solverItems[] = `optionMenuGrp -q -ils ikHandleHOptionMenu`;
- string $menuItemValue;
- int $i;
- for( $i = 0; $i < size($solverItems); $i++ )
- {
- $menuItemValue = `menuItem -q -l $solverItems[$i]`;
- if ($menuItemValue == $solvertype)
- optionMenuGrp -e -sl ($i+1) ikHandleHOptionMenu;
- }
- clear($solverItems);
-
- // auto priority check box
- //
- $set = eval($ctxCmd + " -q -autoPriorityH " + $toolName);
- if ($set) {
- checkBoxGrp -e -value1 1 autoPriorityGrp;
- $autoPriorityFlag = false;
- }
- else {
- checkBoxGrp -e -value1 0 autoPriorityGrp;
- $autoPriorityFlag = true;
- }
-
- // snap handle
- $set = eval($ctxCmd + " -q -snapHandleH " + $toolName);
- if ($set) {
- checkBoxGrp -e -value1 1 snapHandleGrp;
- }
- else {
- checkBoxGrp -e -value1 0 snapHandleGrp;
- }
-
- // force solver
- $set = eval($ctxCmd + " -q -forceSolverH " + $toolName);
- if ($set) {
- checkBoxGrp -e -value1 1 forceSolverGrp;
- }
- else {
- checkBoxGrp -e -value1 0 forceSolverGrp;
- }
-
- //=====================================================
- // For maya1.0, there is not superSticky yet. So in UI,
- // use checkBox to turn on/off sticky.
- //
- // Use radioButtonGrp when implementing superSticky.
- //=====================================================
- // stickies
- $current = eval($ctxCmd + " -q -stickyH " + $toolName);
- if ($current == "sticky") {
- //radioButtonGrp -e -select 2 stickyGrp;
- checkBoxGrp -e -value1 1 stickyGrp;
- }
- //else if ($current == "superSticky") {
- // radioButtonGrp -e -select 3 stickyGrp;
- //}
- else {
- //radioButtonGrp -e -select 1 stickyGrp;
- checkBoxGrp -e -value1 0 stickyGrp;
- }
-
- // priority
- $set = eval($ctxCmd + " -q -priorityH " + $toolName);
- intSliderGrp -e
- -value $set
- -enable $autoPriorityFlag
- priority;
-
- // weight
- $fv = eval($ctxCmd + " -q -weightH " + $toolName);
- floatSliderGrp -e
- -value $fv
- handleWeight;
-
- // poweight
- $fv = eval($ctxCmd + " -q -poWeightH " + $toolName);
- floatSliderGrp -e
- -value $fv
- handlePOWeight;
-
- return;
- }
-
- global proc ikHandleValues( string $toolName ) {
-
- string $parent = (`toolPropertyWindow -q -location` + "|ikHandle");
- setParent $parent;
-
- string $icon = "kinHandle.xpm";
- string $helpTag = "IKHandleTool";
- toolPropertySetCommon $toolName $icon $helpTag;
-
- frameLayout -e -en true -cl false ikHandleHFrame;
- ikHandleHOptionValues( $toolName, "ikHandleCtx");
-
- toolPropertySelect ikHandle;
-
- return;
- }
-
-
-
-